;
;   EVENTS TEXT 9/12/2000
;       for the Civilization II: Test of Time scenario
;   THE RISE OF THE NECROMANCER
;       AKA NECROCIV    
;   
;   Created by Harris (necrociv@yahoo.com)
;       for the Third Scenario Design Contest
;       hosted by the Scenario League (sleague.apolyton.net)
;
;
;
;
; Vampyre Flags
; 01 Good Guy Flag (on if not Corrupt) 
; 02 Resurrection Removal (volatile)
; 03  
; 04  
; 05  
; 06  
; 07  
; 19 Erwan 0=Pirate King Rules, 1=Pirate King Slain
; 20 Jewel of Knowledge bestowed (1=found)
; 21 The Mask Found (1=found)
; ** Leader Survival Flags
; 22 Hero: Djinn
; 23 Hero: Magnus Craeft
; 24 Hero: Lerphin Runeaxe
; 25 Hero: Ariel Trueseer
; 26 Hero: Seraphine
; 27 Hero: The Reaver
; 28-31 Open
;
; Minarian Flags
; 01 Good Guy Flag (on if not Corrupt) 
; 02 Resurrection Removal (volatile)
; 03 Dark Plot Target Flag (1 if target)
; 20-27 Randomizer Support Flags
; 28-31 Randomizer Flags
;
; 
;



; Abyssal Assault - Done
; Living Wonders  - Done
; Leader survival - Done
; Death of the Necromancer - Done
; Resurrection of Heroes - Done
; Negotiations - Done
; Minarian Cultist initialization - Done
; Slave Buying - Done
; Slave taking - Done
; The Gift - Done
; Corruption of the Kings - Done


@BEGINEVENTS
@DEBUG
@INITFLAG

@IF
SCENARIOLOADED
@THEN
DonTPLAYWonDERS
@ENDIF

@IF
NOSCHISM
DEFENDER=Vampyres 
@THEN
@ENDIF

@IF
NOSCHISM
DEFENDER=Free Cities 
@THEN
@ENDIF


; ***********************************************
; **** Forbid Negotiations with the Vampyres ****
; ***********************************************


@IF
Negotiation
talkermask=0b00000000000000000000000000000001
listenermask=0b00000000000111111111111111111111
@THEN
@ENDIF

; prohibit negotiations between aliens and humans

@IF
Negotiation
talkermask=0b00000000000111111111111111111111
listenermask=0b00000000000000000000000000000001
@THEN
@ENDIF



;
; ************************************* STORYLINE EVENTS *************************************
;
@IF
UnitKilled
unit=anyunit
attacker=Vampyres
defender=Anybody
@THEN
JustOnce
TEXT
A messenger rushes in. "Your Majesty, I have grave 
news. We have received word that an army of Undead 
has established itself in the Blighted Swamp. Witnesses 
report that the these creatures are led by some kind of 
powerful daemons that drink the blood of men." 
ENDTEXT
@ENDIF

@IF
UnitKilled
unit=anyunit
attacker=Vampyres
defender=Anybody
@THEN
JustOnce
TEXT
Alarmed by the news, you call advisors together.
"Your thoughts on this news" you begin.
^
Your Mage says, "Undead armies can mean only one 
thing my lord. A Necromancer is involved."
^
"Impossible!" argues the high priest. "The last 
necromancer in Minaria was killed a thousand years ago 
and all knowledge of that dark art was destroyed with him."
ENDTEXT
@ENDIF

@IF
UnitKilled
unit=anyunit
attacker=Vampyres
defender=Anybody
@THEN
JustOnce
TEXT
"The last Necromancer in Minaria was not killed," the 
Mage admonishes, "he was banished by the Lloroi 
Magi to another dimension, a place known as the Abyss."
^
^"The Abyss is just a myth. Is it not?" asks the Castilian.
^
^"The Abyss is quite real," replies the Mage. "Arcane 
texts describe it as home to Daemons and other foul spawn."
ENDTEXT
@ENDIF

@IF
UnitKilled
unit=anyunit
attacker=Vampyres
defender=Anybody
@THEN
JustOnce
TEXT
^Turning to your diviner "Soothsayer, what do the bones 
tell you about this?"
^
^She utters an incantation and casts the enchanted bones 
upon the table. Studying them she says "A shadow stretches 
out across our future. A time of great suffering approaches."
^
^"Castilian," you bark "dispatch scouts to investigate the 
Blighted Swamp. I want to know what we are dealing with."
ENDTEXT
@ENDIF

@IF
UnitKilled
unit=anyunit
attacker=Vampyres
defender=Anybody
@THEN
Delay	
delay=3
JustOnce
TEXT
^Once again you call your council of advisers together.
^
^The Castilian reports, "We have confirmed the existence 
of Undead in the Blighted Swamp, my Lord. These undead legions 
appear to be foot soldiers serving a group of powerful Daemons 
that call themselves, Vampyres."
^
^"These preternatural Vampyre fly and have the strength of 
twenty men. They can sustain horrible wounds and continue 
to fight."
ENDTEXT
@ENDIF

@IF
UnitKilled
unit=anyunit
attacker=Vampyres
defender=Anybody
@THEN
Delay	
delay=3
JustOnce
TEXT
"And what of this Necromancer?"
^
^"We have indeed learned that there is indeed a Necromancer 
in the Blighted Swamp," answers the Mage. "I fear this may 
be the same corrupt Necromancer that was banished 
by the Lloroi long ago. If so, his powers will far exceed 
any Mage in Minaria. I recommend we learn magical Lore so 
that we can defend our nation from these Supernatural creatures."
^
^The High Priest objects, "It was magic that destroyed the Lloroi people. 
Surely there are great dangers in Lore. Such learning could lead to CORRUPTION."
^
^Your advisers murmur in agreement.
ENDTEXT
@ENDIF




; *************************************
; *****  Nation Specific Events   *****
; ************************************* 


@IF
CityTaken	
city=Elb
attacker=Anybody
defender=Immerites
@THEN
JustOnce
TEXT
The great Immerite city of Elb has fallen and the grand temple of their patron god has been sacked! No greater wound could be inflicted upon the religious people of Immer then has been done this day.
ENDTEXT
GiveTechnology
technology=15     ; Defilement at Elb
receiver=Immerites
@ENDIF

@IF
CityTaken	
city=Elb
attacker=Anybody
defender=Muetarians
@THEN
JustOnce
TEXT
Pennol, the capital city of the Muetar has fallen! The temple of Yavanna, goddess of fertility, has been plundered. Muetarian lore suggests that they will forever suffer a blight for failing to protect the house of their patron goddess.
ENDTEXT
GiveTechnology
technology=48     ; Pennol Sacked
receiver=Muetarians
@ENDIF

@IF
CityTaken	
city=Glockus
attacker=Anybody
defender=Rombians
@THEN
JustOnce
TEXT
The Rombian city of Glockus has been captured! The loss of the city has torn the fragile ties that bind their piratical aristocracy together. 
ENDTEXT
GiveTechnology
technology=8     ; Fall of Glockus
receiver=Rombians
@ENDIF

@IF
CityTaken	
city=Erwan
attacker=Muetarians
defender=Anybody
@AND
CheckFlag
WHO=Vampyres
flag=19
state=off
@THEN
TEXT
The forces of Muetar have seized the foul pirate stronghold of Erwan from which that take a sizable booty.
ENDTEXT
GiveTechnology
technology=53     ; Erwan in Flames
receiver=Vampyres
ChangeMoney
receiver=TriggerAttacker
amount=1000
@ENDIF

@IF
CityTaken	
city=Erwan
attacker=Immerites
defender=Anybody
@AND
CheckFlag
WHO=Vampyres
flag=19
state=off
@THEN
TEXT
The noble armies of Immer have captured Erwan, the pirate stronghold. The captured pirate booty is returned to the Guild of Merchants.
ENDTEXT
GiveTechnology
technology=53     ; Erwan in Flames
receiver=Vampyres
BestowImprovement
improvement=25
race=Immerites
capital=on
wonders=on
@ENDIF

@IF
CityTaken	
city=Erwan
attacker=Rombians
defender=Anybody
@AND
CheckFlag
WHO=Vampyres
flag=19
state=off
@THEN
TEXT
The Gynarch's armies have captured Erwan. The treasure of the pirate king is now in the hands of Rombune.
ENDTEXT
GiveTechnology
technology=53     ; Erwan in Flames
receiver=Vampyres
ChangeMoney
receiver=TriggerAttacker
amount=1200
@ENDIF

@IF
CityTaken	
city=Erwan
attacker=Vampyres
defender=Anybody
@AND
CheckFlag
WHO=Vampyres
flag=19
state=off
@THEN
TEXT
The Necromancer's armies have captured the pirate stronghold of Erwan, and forced the pirate king into an alliance.
ENDTEXT
GiveTechnology
technology=57     ; Piracy
receiver=TriggerAttacker
CreateUnit
owner=TriggerAttacker
unit=Pirates
Count=4
veteran=No
homecity=Erwan
locations
111,63,0 ; Erwan
endlocations
@ENDIF

@IF
CityTaken	
city=Erwan
attacker=Coven
defender=Anybody
@THEN
TEXT
The Witch Queen's forces have captured Erwan.
ENDTEXT
GiveTechnology
technology=57     ; Piracy
receiver=TriggerAttacker
CreateUnit
owner=TriggerAttacker
unit=Pirates
Count=2
veteran=No
homecity=Erwan
locations
111,63,0 ; Erwan
endlocations
@ENDIF

@IF
CityTaken	
city=Erwan
attacker=Black Cabal
defender=Anybody
@AND
CheckFlag
WHO=Vampyres
flag=19
state=off
@THEN
TEXT
The Black Cabal's forces have captured Erwan.
ENDTEXT
GiveTechnology
technology=57     ; Piracy
receiver=TriggerAttacker
CreateUnit
owner=TriggerAttacker
unit=Pirates
Count=2
veteran=No
homecity=Erwan
locations
111,63,0 ; Erwan
endlocations
@ENDIF

@IF
CityDestroyed
city=Erwan
owner=anybody
@THEN
TEXT
The Pirate city of Erwan has been destroyed.
ENDTEXT
GiveTechnology
technology=53     ; Erwan in Flames
receiver=Vampyres
@ENDIF

; *** Pirate King Deposed ***
@IF
ReceivedTechnology
receiver=Anybody
technology=53     ; Erwan in Flames
@THEN
JustOnce
Flag
Who=Vampyres
Continuous
state=on
flag=19
TEXT
Piratical raiding in Minaria has been ended.
ENDTEXT
@ENDIF


;
; ************************************* CORRUPTION AND SCHISM EVENTS *************************************
;
; *************************************
; *****    Flag Initialization    *****
; *****   Set the Good Guy Flag   *****
; ************************************* 
;
; Set Not Corrupt Flag On (Permanent) for everyone
@IF
ReceivedTechnology
receiver=Anybody
technology=93     ; Corruption
@THEN
Flag
Continuous
state=on
flag=1
@ENDIF


; Set Not Corrupt Flag to Off if Corrupt (non-permanent)
@IF
ReceivedTechnology
receiver=Anybody
technology=93     ; Corruption
@THEN
Flag
Who=TriggerReceiver
state=off
flag=1
@ENDIF


; *************************************
; *****   White Magic Prevents    *****
; *****        Corruption         *****
; *************************************

@IF
ReceivedTechnology
Receiver=Anybody
technology=26     ; White Magic
@THEN
EnableTechnology
WHOM=TriggerReceiver
technology=93     ; Corruption
value=2
@ENDIF


; *************************************
; *****   Rise of Dark Forces     *****
; *****   Initialize the Coven    *****
; *****   and the Black Cabal     *****
; *************************************

@IF
ReceivedTechnology
receiver=Black Cabal     
technology=38     ; Folk
@THEN
GiveTechnology
technology=93     ; Corruption
receiver=TriggerReceiver
ModifyReputation
who=TriggerReceiver
betray=5
@END

@IF
ReceivedTechnology
receiver=Coven
technology=38     ; Folk
@THEN
JustOnce
GiveTechnology
technology=93     ; Corruption
receiver=TriggerReceiver
ModifyReputation
who=TriggerReceiver
betray=5
@END

@IF
ReceivedTechnology
receiver=Coven
technology=38     ; Folk
@THEN
JustOnce
GiveTechnology
technology=27     ; Beguiling
receiver=TriggerReceiver
@END

@IF
ReceivedTechnology
receiver=Coven
technology=38     ; Folk
@THEN
JustOnce
CreateUnit
InCapital
owner=Coven
unit=Witch
Count=4
veteran=No
homecity=None
@END


; *************************************
; *****   Effects of Corruption:  *****
; ***** Open to the Necromancer's *****
; *****    Diplomatic Overtures    *****
; *************************************
;
@IF
ReceivedTechnology
receiver=Anybody
technology=93     ; Corruption
@THEN
ModifyReputation
who=TriggerReceiver
whom=Vampyres
modifier=10
@ENDIF

@IF
ReceivedTechnology
receiver=Muetarians
technology=93     ; Corruption
@THEN
Negotiator
who=TriggerReceiver
type=Listener
state=Clear
@ENDIF

@IF
ReceivedTechnology
receiver=Immerites
technology=93     ; Corruption
@THEN
Negotiator
who=TriggerReceiver
type=Listener
state=Clear
@ENDIF

@IF
ReceivedTechnology
receiver=Rombians
technology=93     ; Corruption
@THEN
Negotiator
who=TriggerReceiver
type=Listener
state=Clear
@ENDIF

@IF
ReceivedTechnology
receiver=Coven
technology=93     ; Corruption
@THEN
Negotiator
who=TriggerReceiver
type=Listener
state=Clear
@ENDIF

@IF
ReceivedTechnology
receiver=Free Cities
technology=93     ; Corruption
@THEN
Negotiator
who=TriggerReceiver
type=Listener
state=Clear
@ENDIF

@IF
ReceivedTechnology
receiver=Black Cabal
technology=93     ; Corruption
@THEN
Negotiator
who=TriggerReceiver
type=Listener
state=Clear
@ENDIF


; *************************************
; *****   Effects of Corruption:  *****
; *****   Prevent White Magics    *****
; *************************************
;

@IF
ReceivedTechnology
Receiver=Anybody
technology=93     ; Corruption
@THEN
EnableTechnology
WHOM=triggerreceiver
technology=26     ; White Magic
value=2
@ENDIF

@IF
ReceivedTechnology
receiver=Anybody
technology=93     ; Corruption
@THEN
EnableTechnology
WHOM=triggerreceiver
technology=70     ; Fertility
value=2
@ENDIF

@IF
ReceivedTechnology
receiver=Anybody
technology=93     ; Corruption
@THEN
EnableTechnology
WHOM=triggerreceiver
technology=99     ; Resurrection
value=2
@ENDIF

@IF
ReceivedTechnology
Receiver=Anybody
technology=93     ; Corruption
@THEN
EnableTechnology
WHOM=triggerreceiver
technology=57     ; Piracy
value=0
@ENDIF

@IF
ReceivedTechnology
Receiver=Anybody
technology=93     ; Corruption
@THEN
EnableTechnology
whom=triggerreceiver
technology=5      ; Plunder
value=0
@ENDIF

@IF
ReceivedTechnology
Receiver=Anybody
technology=93     ; Corruption
@THEN
EnableTechnology
whom=triggerreceiver
technology=58     ; Slave Labor
value=0
@ENDIF

@IF
ReceivedTechnology
Receiver=Anybody
technology=93     ; Corruption
@THEN
EnableTechnology
whom=triggerreceiver
technology=72     ; Rabble
value=0
@END

@IF
ReceivedTechnology
Receiver=Anybody
technology=93     ; Corruption
@THEN
EnableTechnology
whom=triggerreceiver
technology=34  ; Dolor
value=0
@ENDIF

@IF
ReceivedTechnology
Receiver=Anybody
technology=93     ; Corruption
@THEN
EnableTechnology
whom=triggerreceiver
technology=80     ; Domination
value=0
@ENDIF

@IF
ReceivedTechnology
Receiver=Anybody
technology=93     ; Corruption
@THEN
EnableTechnology
whom=triggerreceiver
technology=62     ; Vampyrism
value=0
@ENDIF

@IF
ReceivedTechnology
Receiver=Anybody
technology=93     ; Corruption
@THEN
EnableTechnology
whom=triggerreceiver
technology=77     ; Subversion
value=0
@ENDIF

@IF
ReceivedTechnology
Receiver=Anybody
technology=93     ; Corruption
@THEN
EnableTechnology
whom=triggerreceiver
technology=27  ; Beguiling
value=0
@ENDIF

; *************************************
; *****  The Necromancer's Gift   *****
; ************************************* 
;
@IF
ReceivedTechnology
receiver=Vampyres
technology=79     ; Bestow Gift
@THEN
EnableTechnology
WHOM=Anybody
technology=10     ; The Gift
value=0
@ENDIF

; **** Prevented by White Magic ****

@IF
ReceivedTechnology
Receiver=Anybody
technology=26     ; White Magic
@THEN
EnableTechnology
WHOM=TriggerReceiver
technology=10     ; The Gift
value=2
@ENDIF


; **************************************
; *****       Living Wonders       *****
; *****       A Tainted Gift       *****
; **************************************
@IF
CityProduction
builder=Anybody
improvement=54    ; The Crown of Might
@THEN
GiveTechnology
technology=93     ; Corruption
receiver=TriggerReceiver
TEXT
no broadcast
You place the Crown of Might upon your brow!
The surge of power you feel is so intoxicating 
that you barely feel ...
ENDTEXT
@ENDIF

@IF
CityProduction
builder=Anybody
improvement=54    ; The Crown of Might
@THEN
TakeTechnology
whom=Vampyres
collapse
technology=26       ; White Magic
TEXT
no broadcast
... the Necromancer's evil tainting your mortal soul.
ENDTEXT
@ENDIF



; *************************************
; *****   Effects of Corruption   *****
; *****    sow discord between    *****
; *****  the Corrupt and the Good *****
; *************************************
;
; If Random turn and Good Guy then kingdom becomes the target of the Corrupt
@IF
RandomTurn
denominator=30
@AND
CheckFlag
WHO=Muetarians
flag=1
state=on
@THEN
Flag
WHO=Muetarians
state=on
flag=3
@ENDIF

@IF
RandomTurn
denominator=25
@AND
CheckFlag
WHO=Immerites
flag=1
state=on
@THEN
Flag
WHO=Immerites
state=on
flag=3
@ENDIF

@IF
RandomTurn
denominator=40
@AND
CheckFlag
WHO=Rombians
flag=1
state=on
@THEN
Flag
WHO=Rombians
state=on
flag=3
@ENDIF

@IF
RandomTurn
denominator=35
@AND
CheckFlag
WHO=Free Cities
flag=1
state=on
@THEN
Flag
WHO=Free Cities
state=on
flag=3
@ENDIF

@IF
RandomTurn
denominator=5
@AND
ReceivedTechnology
receiver=Anybody
technology=26     ; White Magic
@THEN
Flag
WHO=TriggerReceiver
state=on
flag=3
@ENDIF




; ******** Corrupt Nations attack a target Good Guy  ********

@IF
ReceivedTechnology
receiver=Anybody
technology=93     ; Corruption
@AND
CheckFlag
WHO=Muetarians
flag=3
state=on
@THEN
MakeAggression
who=TriggerReceiver
whom=Muetarians
@END

@IF
ReceivedTechnology
receiver=Anybody
technology=93     ; Corruption
@AND
CheckFlag
WHO=Immerites
flag=3
state=on
@THEN
MakeAggression
who=TriggerReceiver
whom=Immerites
@END

@IF
ReceivedTechnology
receiver=Anybody
technology=93     ; Corruption
@AND
CheckFlag
WHO=Rombians
flag=3
state=on
@THEN
MakeAggression
who=TriggerReceiver
whom=Rombians
@END

@IF
ReceivedTechnology
receiver=Anybody
technology=93     ; Corruption
@AND
CheckFlag
WHO=Free Cities
flag=3
state=on
@THEN
MakeAggression
who=TriggerReceiver
whom=Free Cities
@END


;
; ************************************* SLAVE TAKING EVENTS *************************************
;
; *************************************
; *****       Slave Buying        *****
; *************************************
@IF
CityProduction
builder=anybody
unit=Slaves
@THEN
ChangeMoney
receiver=TriggerReceiver
amount=-50
@ENDIF

; ***************************************
; *****  Slavery Restricts Nations  *****
; *****        from learning        *****
; *****    Skilled Labor Advances   *****
; ***************************************
@IF
ReceivedTechnology
receiver=Anybody
technology=58        ; Slave Labor
@THEN
EnableTechnology
WHOM=TriggerReceiver
technology=69        ; Public Works
value=2
@ENDIF

@IF
ReceivedTechnology
receiver=Anybody
technology=58        ; Slave Labor
@THEN
EnableTechnology
WHOM=TriggerReceiver
technology=66        ; Excavation
value=2
@ENDIF

@IF
ReceivedTechnology
receiver=Anybody
technology=58        ; Slave Labor
@THEN
EnableTechnology
WHOM=TriggerReceiver
technology=19        ; Trade Union
value=2
@ENDIF




; *************************************
; *****   Vampyre Slave Taking    *****
; *************************************
@IF
CityTaken
city=anycity
attacker=Vampyres
defender=anybody
@THEN
TEXT
The Vampyres have conquered another city 
and made slaves of its citizens.
ENDTEXT
CREATEUNIT
InCapital
owner=TriggerAttacker
unit=Slaves
veteran=No
homecity=Zards
@ENDIF

; *************************************
; *****  Muetarian Slave Taking   *****
; *************************************
@IF
CityTaken
city=anycity
attacker=Muetarians
defender=anybody
@AND
ReceivedTechnology
receiver=Muetarians
technology=58        ; Slave Labor
@THEN
TEXT
The villainous Muetarians have conquered another 
city and made slaves of its citizens.
ENDTEXT
CREATEUNIT
InCapital
owner=TriggerAttacker
unit=Slaves
veteran=No
homecity=Pennol
@ENDIF

; *************************************
; *****   Immerite Slave Taking   *****
; *************************************
@IF
CityTaken
city=anycity
attacker=Immerites
defender=anybody
@AND
ReceivedTechnology
receiver=Immerites
technology=58        ; Slave Labor
@THEN
TEXT
The fell Immerites have conquered another city 
and made slaves of its citizens.
ENDTEXT
CREATEUNIT
InCapital
owner=TriggerAttacker
unit=Slaves
veteran=No
homecity=Godspell
@ENDIF

; *************************************
; *****   Rombian Slave Taking    *****
; *************************************
@IF
CityTaken
city=anycity
attacker=Rombians
defender=anybody
@AND
ReceivedTechnology
receiver=Rombians
technology=58        ; Slave Labor
@THEN
TEXT
The wretched Rombians have conquered another city 
and made slaves of its citizens.
ENDTEXT
CREATEUNIT
InCapital
owner=TriggerAttacker
unit=Slaves
veteran=No
homecity=Rombune
@ENDIF


; *************************************
; *****    Coven Slave Taking     *****
; *************************************
@IF
CityTaken
city=anycity
attacker=Coven
defender=anybody
@AND
ReceivedTechnology
receiver=Coven
technology=58        ; Slave Labor
@THEN
TEXT
The hateful Coven Cabal have conquered another city 
and made slaves of its citizens.
ENDTEXT
CREATEUNIT
InCapital
owner=TriggerAttacker
unit=Slaves
veteran=No
homecity=None
@ENDIF



; *************************************
; *****  Black Cabal Slave Taking *****
; *************************************
@IF
CityTaken
city=anycity
attacker=Black Cabal
defender=anybody
@AND
ReceivedTechnology
receiver=Black Cabal
technology=58        ; Slave Labor
@THEN
TEXT
The Dread Black Cabal have conquered another city 
and made slaves of its citizens.
ENDTEXT
CREATEUNIT
InCapital
owner=TriggerAttacker
unit=Slaves
veteran=No
homecity=None
@ENDIF

;
; ************************************* LIVING WONDER RELATED EVENTS *************************************
;
; **************************************
; *****       Living Wonders       *****
; *****       Legendary Hero       *****
; **************************************
@IF
CityProduction
builder=Anybody
improvement=47    ; Legendary Hero
@THEN
Text
Lerphin Runeaxe, the greatest warrior in 
all of Minaria, has answered your summons. 
EndText
CreateUnit
InCapital
owner=TriggerReceiver
unit=Lerphin Runeaxe
veteran=No
homecity=None
@ENDIF


; **************************************
; *****       Living Wonders       *****
; *****         The Reaver         *****
; **************************************
@IF
CityProduction
builder=Anybody
improvement=43
@THEN
Text
The brilliant privateer Captain Barrot aboard 
his infamous warship, The Reaver, has arrived 
in the Sea of Zett and is awaiting your orders. 
EndText
CreateUnit
owner=TriggerReceiver
unit=The Reaver
veteran=No
homecity=None
Randomize
locations
85,13,0
98,32,0
86,54,0
104,62,0
45,51,0
endlocations
@ENDIF

; **************************************
; *****       Living Wonders       *****
; *****           The Imp          *****
; **************************************
@IF
CityProduction
builder=Anybody
improvement=44    ; The Imp
@THEN
EnableTechnology
WHOM=TriggerReceiver
technology=93     ; Corruption
value=1
@ENDIF

; **************************************
; *****       Living Wonders       *****
; *****          The Djinn         *****
; **************************************
@IF
CityProduction
builder=Anybody
improvement=52    ; Djinn Lamp
@THEN
Text
Your skill in the art of conjuration has 
allowed you to summon, Zethi'katahha, 
the fabled Djinn of the Lamp. 
EndText
CreateUnit
InCapital
owner=TriggerReceiver
unit=Djinn
veteran=No
homecity=None
@ENDIF

; **************************************
; *****       Living Wonders       *****
; *****          Seraphine         *****
; **************************************
@IF
CityProduction
builder=Anybody
improvement=53
@THEN
Text
no broadcast
The Unicorn's Horn, at tavern owned by the 
warrior-bard Seraphine, has become famous 
as a gathering place for bards from all over 
Minaria. Seraphine has come to the capital 
to pledge her sword in service of her liege. 
EndText
CreateUnit
InCapital
owner=TriggerReceiver
unit=Seraphine
veteran=No
homecity=None
@ENDIF


; **************************************
; *****       Living Wonders       *****
; *****        Magnus Craeft       *****
; **************************************
@IF
CityProduction
builder=Anybody
improvement=42    ; Renown Wizard
@THEN
Text
no broadcast
After an exhaustive search, the great wizard 
Magnus Craeft has finally been located.
He has pledged to join your crusade to rid 
Minaria of the fell Vampyres.
EndText
CreateUnit
InCapital
owner=TriggerReceiver
unit=Magnus Craeft
veteran=No
homecity=None
@ENDIF


; **************************************
; *****       Living Wonders       *****
; *****       Ariel Trueseer       *****
; **************************************
@IF
CityProduction
builder=Anybody
improvement=56    ; Visionary
@THEN
Text
no broadcast
The wizard savant, Ariel Trueseer, has come 
to your capital to join your crusade to rid 
Minaria of the fell Vampyres.
EndText
CreateUnit
InCapital
owner=TriggerReceiver
unit=Ariel Trueseer
veteran=No
homecity=None
@ENDIF



;
; ************************************* SPECIAL UNIT SURVIVAL EVENTS *************************************
;
; *************************************
; *****      Leader Survival      *****
; *****       Magnus Craeft       *****
; ************************************* 
@IF
RandomTurn
denominator=3
@AND
UnitKilled
unit=Magnus Craeft
attacker=Anybody
defender=Anybody
@THEN
Flag
who=Vampyres
flag=23
state=on
@ENDIF

@IF
UnitKilled
unit=Magnus Craeft
attacker=Anybody
defender=Anybody
@AND
CheckFlag
WHO=Vampyres
flag=23
state=on
@THEN
Text
Magnus Craeft has fallen in battle.
EndText
GiveTechnology
technology=95     ; Death of Magnus Craeft
receiver=TriggerDefender
@ENDIF

@IF
UnitKilled
unit=Magnus Craeft
attacker=Anybody
defender=Anybody
@AND
CheckFlag
WHO=Vampyres
flag=23 
state=off
@THEN
Text
Magnus Craeft was wounded in battle. He has been taken to the capital to recover.
EndText
@ENDIF

@IF
UnitKilled
unit=Magnus Craeft
attacker=Anybody
defender=Anybody
@AND
CheckFlag
WHO=Vampyres
flag=23
state=off
@THEN
DELAY
randomize
delay=6
TEXT
Magnus Craeft has recovered from his wounds and is ready for duty.
ENDTEXT
CreateUnit
InCapital
owner=TriggerDefender
unit=Magnus Craeft
veteran=No
homecity=None
@ENDIF


; *************************************
; *****      Leader Survival      *****
; *****      Lerphin Runeaxe      *****
; *************************************
@IF
RandomTurn
denominator=4
@AND
UnitKilled
unit=Lerphin Runeaxe
attacker=Anybody
defender=Anybody
@THEN
Flag
who=Vampyres
flag=24
state=on
@ENDIF

@IF
UnitKilled
unit=Lerphin Runeaxe
attacker=Anybody
defender=Anybody
@AND
CheckFlag
WHO=Vampyres
flag=24
state=on
@THEN
Text
Lerphin Runeaxe has fallen in battle.
EndText
GiveTechnology
technology=97     ; Death of Lerphin Runeaxe
receiver=TriggerDefender
@ENDIF

@IF
UnitKilled
unit=Lerphin Runeaxe
attacker=Anybody
defender=Anybody
@AND
CheckFlag
WHO=Vampyres
flag=24 
state=off
@THEN
Text
Lerphin Runeaxe was wounded in battle. He has been taken to the capital to recover.
EndText
@ENDIF

@IF
UnitKilled
unit=Lerphin Runeaxe
attacker=Anybody
defender=Anybody
@AND
CheckFlag
WHO=Vampyres
flag=24
state=off
@THEN
DELAY
randomize
delay=10
TEXT
Lerphin Runeaxe has recovered from his wounds and is ready for duty.
ENDTEXT
CreateUnit
owner=TriggerDefender
unit=Lerphin Runeaxe
veteran=No
homecity=None
InCapital
locations
43,53,0
endlocations
@ENDIF


; *************************************
; *****      Leader Survival      *****
; *****       Ariel Trueseer      *****
; *************************************
@IF
RandomTurn
denominator=4
@AND
UnitKilled
unit=Ariel Trueseer
attacker=Anybody
defender=Anybody
@THEN
Flag
who=Vampyres
flag=25
state=on
@ENDIF

@IF
UnitKilled
unit=Ariel Trueseer
attacker=Anybody
defender=Anybody
@AND
CheckFlag
WHO=Vampyres
flag=25
state=on
@THEN
Text
Ariel Trueseer has fallen in battle.
EndText
GiveTechnology
technology=96     ; Death of Ariel Trueseer
receiver=TriggerDefender
@ENDIF

@IF
UnitKilled
unit=Ariel Trueseer
attacker=Anybody
defender=Anybody
@AND
CheckFlag
WHO=Vampyres
flag=25 
state=off
@THEN
Text
Ariel Trueseer was wounded in battle. She has been taken to the capital to recover.
EndText
@ENDIF

@IF
UnitKilled
unit=Ariel Trueseer
attacker=Anybody
defender=Anybody
@AND
CheckFlag
WHO=Vampyres
flag=25
state=off
@THEN
DELAY
randomize
delay=10
TEXT
Ariel Trueseer has recovered from her wounds and is ready for duty.
ENDTEXT
CreateUnit
InCapital
owner=TriggerDefender
unit=Ariel Trueseer
veteran=No
homecity=None
@ENDIF


; *************************************
; *****      Leader Survival      *****
; *****         Seraphine         *****
; *************************************
@IF
UnitKilled
unit=Seraphine
attacker=Anybody
defender=Anybody
@AND
RandomTurn
denominator=4
@THEN
Flag
who=Vampyres
flag=26
state=on
@ENDIF

@IF
UnitKilled
unit=Seraphine
attacker=Anybody
defender=Anybody
@AND
CheckFlag
WHO=Vampyres
flag=26 
state=on
@THEN
Text
Seraphine, the warrior bard, has fallen in battle.
EndText
GiveTechnology
technology=98     ; Death of Seraphine
receiver=TriggerDefender
@ENDIF

@IF
UnitKilled
unit=Seraphine
attacker=Anybody
defender=Anybody
@AND
CheckFlag
WHO=Vampyres
flag=26 
state=off
@THEN
Text
Seraphine was wounded in battle. She has been taken to the capital to recover.
EndText
@ENDIF

@IF
UnitKilled
unit=Seraphine
attacker=Anybody
defender=Anybody
@AND
CheckFlag
WHO=Vampyres
flag=26 
state=off
@THEN
DELAY
randomize
delay=10
TEXT
Seraphine has recovered from her wounds and is ready for duty.
ENDTEXT
CreateUnit
InCapital
owner=TriggerDefender
unit=Seraphine
veteran=No
homecity=None
@ENDIF


;
; ************************************* RESURECTION AND REFORMATION EVENTS *************************************
;
; *************************************
; *****   Death and Reformation   *****
; *****     of the Necromancer    *****
; *************************************
@IF
UnitKilled
unit=Necromancer
attacker=Anybody
defender=Vampyres
@THEN
Text
The material form of the Necromancer has 
been destroyed! His essence in the form 
of a wraith has returned to his stronghold 
of Zards to reform a material body. 
^
^The Necromancer has been hurt, but has not 
been destroyed. 
^
^He will return with a vengeance.
EndText
GiveTechnology
technology=68     ; Wraithform
receiver=Vampyres
@ENDIF

@IF
ReceivedTechnology
receiver=Vampyres
technology=33        ; Reconstitution
@AND
ReceivedTechnology
receiver=Vampyres
technology=68        ; Wraithform
@THEN
Text
The material body of the Necromancer 
has reformed. Minaria beware!
EndText
CreateUnit
InCapital
owner=Vampyres
unit=Necromancer
veteran=No
homecity=None
TakeTechnology
whom=Vampyres
collapse
technology=68       ; Wraithform & Reconstitution
@ENDIF


; *************************************
; ***** Reformation of the Djinn  *****
; *************************************
@IF
UnitKilled
unit=Djinn
attacker=Anybody
defender=Anybody
@THEN
Text
The material form of the Djinn has been 
destroyed and her essence has returned 
to the lamp to reform her material body.
Zethi'katahha will emerge from the lamp
in one years time. 
EndText
GiveTechnology
technology=90     ; Djinn Disembodied
receiver=TriggerDefender
@ENDIF


@IF
UnitKilled
unit=Djinn
attacker=Anybody
defender=Anybody
@THEN
DELAY
delay=12
Text
The material body of the Djinn has reformed. 
Zethi'katahha is once again ready to serve 
her mortal master and the power has been 
restored to the lamp. 
EndText
CreateUnit
InCapital
owner=TriggerDefender
unit=Djinn
veteran=No
homecity=None
TakeTechnology
whom=TriggerDefender
technology=90        ; Djinn Disembodied
@ENDIF


; *************************************
; *****       Resurrection        *****
; *****      Magnus Craeft        *****
; *************************************
@IF
ReceivedTechnology
receiver=Muetarians
technology=99        ; Resurrection
@AND
CheckFlag
who=Muetarians
flag=2
technology=95        ; Death of Magnus
state=off
@THEN
TEXT
The high priest of Muetar calls upon the gods of Minaria 
as he evokes the power of the Resurrection Spell 
returning Magnus Craeft to LIFE!
ENDTEXT
CREATEUNIT
InCapital
owner=TriggerReceiver
unit=Magnus Craeft
veteran=No
homecity=None
TakeTechnology
whom=TriggerReceiver
technology=95        ; Death of Magnus
Flag
WHO=TriggerReceiver
state=on
flag=2
@ENDIF

@IF
CheckFlag
WHO=Muetarians
state=on
flag=2
@THEN
TakeTechnology
whom=Muetarians
technology=99        ; Resurrection
@ENDIF

@IF
ReceivedTechnology
receiver=Immerites
technology=99        ; Resurrection
@AND
CheckFlag
who=Immerites
flag=2
technology=95        ; Death of Magnus
state=off
@THEN
TEXT
The high priest of Immer calls upon the gods of Minaria 
as he envois the power of the Resurrection Spell 
returning Magnus Craeft to LIFE!
ENDTEXT
CREATEUNIT
InCapital
owner=TriggerReceiver
unit=Magnus Craeft
veteran=No
homecity=None
TakeTechnology
whom=TriggerReceiver
technology=95        ; Death of Magnus
Flag
WHO=TriggerReceiver
state=on
flag=2
@ENDIF

@IF
CheckFlag
WHO=Immerites
state=on
flag=2
@THEN
TakeTechnology
whom=Immerites
technology=99        ; Resurrection
@ENDIF

@IF
ReceivedTechnology
receiver=Rombians
technology=99        ; Resurrection
@AND
CheckFlag
who=Rombians
flag=2
technology=95        ; Death of Magnus
state=off
@THEN
TEXT
The Rombian high priest calls upon the gods of Minaria 
as he evokes the power of the Resurrection Spell 
returning Magnus Craeft to LIFE!
ENDTEXT
CREATEUNIT
InCapital
owner=TriggerReceiver
unit=Magnus Craeft
veteran=No
homecity=None
TakeTechnology
whom=TriggerReceiver
technology=95        ; Death of Magnus
Flag
WHO=TriggerReceiver
state=on
flag=2
@ENDIF

@IF
CheckFlag
WHO=Rombians
state=on
flag=2
@THEN
TakeTechnology
whom=Rombians
technology=99        ; Resurrection
@ENDIF


; *************************************
; *****       Resurrection        *****
; *****     Lerphin Runeaxe       *****
; *************************************
@IF
ReceivedTechnology
receiver=Muetarians
technology=99        ; Resurrection
@AND
CheckFlag
who=Muetarians
flag=2
technology=97        ; Death of Lerphin
state=off
@THEN
TEXT
The high priest of Muetar calls upon the gods of Minaria 
as he evokes the power of the Resurrection Spell 
returning Lerphin Runeaxe to LIFE!
ENDTEXT
CREATEUNIT
InCapital
owner=TriggerReceiver
unit=Lerphin Runeaxe
veteran=No
homecity=None
TakeTechnology
whom=TriggerReceiver
technology=97        ; Death of Lerphin
Flag
WHO=TriggerReceiver
state=on
flag=2
@ENDIF

@IF
CheckFlag
WHO=Muetarians
state=on
flag=2
@THEN
TakeTechnology
whom=Muetarians
technology=99        ; Resurrection
@ENDIF


@IF
ReceivedTechnology
receiver=Immerites
technology=99        ; Resurrection
@AND
CheckFlag
who=Immerites
flag=2
technology=97        ; Death of Lerphin
state=off
@THEN
TEXT
The high priest of Immer calls upon the gods of Minaria 
as he evokes the power of the Resurrection Spell 
returning Lerphin Runeaxe to LIFE!
ENDTEXT
CREATEUNIT
InCapital
owner=TriggerReceiver
unit=Lerphin Runeaxe
veteran=No
homecity=None
TakeTechnology
whom=TriggerReceiver
technology=97        ; Death of Lerphin
Flag
WHO=TriggerReceiver
state=on
flag=2
@ENDIF

@IF
CheckFlag
WHO=Immerites
state=on
flag=2
@THEN
TakeTechnology
whom=Immerites
technology=99        ; Resurrection
@ENDIF

@IF
ReceivedTechnology
receiver=Rombians
technology=99        ; Resurrection
@AND
CheckFlag
who=Rombians
flag=2
technology=97        ; Death of Lerphin
state=off
@THEN
TEXT
The Rombian high priest calls upon the gods of Minaria 
as he evokes the power of the Resurrection Spell 
returning Lerphin Runeaxe to LIFE!
ENDTEXT
CREATEUNIT
InCapital
owner=TriggerReceiver
unit=Lerphin Runeaxe
veteran=No
homecity=None
TakeTechnology
whom=TriggerReceiver
technology=97        ; Death of Lerphin
Flag
WHO=TriggerReceiver
state=on
flag=2
@ENDIF

@IF
CheckFlag
WHO=Rombians
state=on
flag=2
@THEN
TakeTechnology
whom=Rombians
technology=99        ; Resurrection
@ENDIF


; *************************************
; *****       Resurrection        *****
; *****      Ariel Trueseer       *****
; *************************************
@IF
ReceivedTechnology
receiver=Muetarians
technology=99        ; Resurrection
@AND
CheckFlag
who=Muetarians
flag=2
technology=96        ; Death of Ariel
state=off
@THEN
TEXT
The high priest of Muetar calls upon the gods of Minaria 
as he evokes the power of the Resurrection Spell 
returning Ariel Trueseer to LIFE!
ENDTEXT
CREATEUNIT
InCapital
owner=TriggerReceiver
unit=Ariel Trueseer
veteran=No
homecity=None
TakeTechnology
whom=TriggerReceiver
technology=96        ; Death of Ariel
Flag
WHO=TriggerReceiver
state=on
flag=2
@ENDIF

@IF
CheckFlag
WHO=Muetarians
state=on
flag=2
@THEN
TakeTechnology
whom=Muetarians
technology=99        ; Resurrection
@ENDIF


@IF
ReceivedTechnology
receiver=Immerites
technology=99        ; Resurrection
@AND
CheckFlag
who=Immerites
flag=2
technology=96        ; Death of Ariel
state=off
@THEN
TEXT
The high priest of Immer calls upon the gods of Minaria 
as he evokes the power of the Resurrection Spell 
returning Ariel Trueseer to LIFE!
ENDTEXT
CREATEUNIT
InCapital
owner=TriggerReceiver
unit=Ariel Trueseer
veteran=No
homecity=None
TakeTechnology
whom=TriggerReceiver
technology=96        ; Death of Ariel
Flag
WHO=TriggerReceiver
state=on
flag=2
@ENDIF

@IF
CheckFlag
WHO=Immerites
state=on
flag=2
@THEN
TakeTechnology
whom=Immerites
technology=99        ; Resurrection
@ENDIF

@IF
ReceivedTechnology
receiver=Rombians
technology=99        ; Resurrection
@AND
CheckFlag
who=Rombians
flag=2
technology=96        ; Death of Ariel
state=off
@THEN
TEXT
The Rombian high priest calls upon the gods of Minaria 
as he evokes the power of the Resurrection Spell 
returning Ariel Trueseer to LIFE!
ENDTEXT
CREATEUNIT
InCapital
owner=TriggerReceiver
unit=Ariel Trueseer
veteran=No
homecity=None
TakeTechnology
whom=TriggerReceiver
technology=96        ; Death of Ariel
Flag
WHO=TriggerReceiver
state=on
flag=2
@ENDIF

@IF
CheckFlag
WHO=Rombians
state=on
flag=2
@THEN
TakeTechnology
whom=Rombians
technology=99        ; Resurrection
@ENDIF


; *************************************
; *****       Resurrection        *****
; *****         Seraphine         *****
; *************************************
@IF
ReceivedTechnology
receiver=Muetarians
technology=99        ; Resurrection
@AND
CheckFlag
who=Muetarians
flag=2
technology=98        ; Death of Seraphine
state=off
@THEN
TEXT
The high priest of Muetar calls upon the gods of Minaria 
as he evokes the power of the Resurrection Spell 
returning the warrior-bard Seraphine to LIFE!
ENDTEXT
CREATEUNIT
InCapital
owner=TriggerReceiver
unit=Seraphine
veteran=No
homecity=None
TakeTechnology
whom=TriggerReceiver
technology=98        ; Death of Serphine
Flag
WHO=TriggerReceiver
state=on
flag=2
@ENDIF

@IF
CheckFlag
WHO=Muetarians
state=on
flag=2
@THEN
TakeTechnology
whom=Muetarians
technology=99        ; Resurrection
@ENDIF


@IF
ReceivedTechnology
receiver=Immerites
technology=99        ; Resurrection
@AND
CheckFlag
who=Immerites
flag=2
technology=98        ; Death of Serphine
state=off
@THEN
TEXT
The high priest of Immer calls upon the gods of Minaria 
as he evokes the power of the Resurrection Spell 
returning the warrior-bard Seraphine to LIFE!
ENDTEXT
CREATEUNIT
InCapital
owner=TriggerReceiver
unit=Seraphine
veteran=No
homecity=None
TakeTechnology
whom=TriggerReceiver
technology=98        ; Death of Serphine
Flag
WHO=TriggerReceiver
state=on
flag=2
@ENDIF

@IF
CheckFlag
WHO=Immerites
state=on
flag=2
@THEN
TakeTechnology
whom=Immerites
technology=99        ; Resurrection
@ENDIF

@IF
ReceivedTechnology
receiver=Rombians
technology=99        ; Resurrection
@AND
CheckFlag
who=Rombians
flag=2
technology=98        ; Death of Serphine
state=off
@THEN
TEXT
The Rombian high priest calls upon the gods of Minaria 
as he evokes the power of the Resurrection Spell 
returning the warrior-bard Seraphine to LIFE!
ENDTEXT
CREATEUNIT
InCapital
owner=TriggerReceiver
unit=Seraphine
veteran=No
homecity=None
TakeTechnology
whom=TriggerReceiver
technology=98        ; Death of Serphine
Flag
WHO=TriggerReceiver
state=on
flag=2
@ENDIF

@IF
CheckFlag
WHO=Rombians
state=on
flag=2
@THEN
TakeTechnology
whom=Rombians
technology=99        ; Resurrection
@ENDIF




;
; ************************************* RUIN EXPLORATION EVENTS *************************************
;
; *************************************
; *****     Ruins Exploration     *****
; *****       Dark Conjuror       *****
; ************************************* 
;
@IF
UnitKilled
unit=Conjuror
attacker=Muetarians
defender=Bane
@AND
CheckFlag
WHO=Muetarians
flag=1
state=on
@THEN
EnableTechnology
WHOM=TriggerAttacker
technology=60     ; Reclusive Mage
value=0
TEXT
no broadcast
From the Dark Conjuror's journal 
discover a clue to the whereabouts 
of the Reclusive Mage, Magnus Craeft. 
ENDTEXT
@ENDIF

@IF
UnitKilled
unit=Conjuror
attacker=Immerites
defender=Bane
@AND
CheckFlag
WHO=Immerites
flag=1
state=on
@THEN
EnableTechnology
WHOM=TriggerAttacker
technology=60     ; Reclusive Mage
value=0
TEXT
no broadcast
From the Dark Conjuror's journal 
discover a clue to the whereabouts 
of the Reclusive Mage, Magnus Craeft. 
ENDTEXT
@ENDIF


;
; ************************************* RANDOM BADNESS *************************************
;
; *************************************
; *****   The Leviathan Awakens   *****
; ************************************* 
;
@IF
ReceivedTechnology
receiver=Anybody
technology=85         ; Plane Study
@AND
RandomTurn
denominator=25
@THEN
JustOnce
CreateUnit
owner=Bane
unit=Leviathan
veteran=No
homecity=None
Randomize
locations
85,13,0
98,32,0
86,54,0
104,62,0
45,51,0
endlocations
TEXT
The ports are rife with news. Sailors have learned 
from the Merfolk that the great Leviathan has awoken from 
its hundred year slumber. Rumor has it that this horror of the 
deep has a vicarious appetite and is large enough to 
swallow a small ship whole.
ENDTEXT
@ENDIF

; *************************************
; *****      Storms at Sea        *****
; ************************************* 
;

; *************************************
; *****        Barghest!          *****
; ************************************* 
;
@IF
ReceivedTechnology
receiver=Anybody
technology=34         ; Dolor
@AND
RandomTurn
denominator=50
@THEN
CreateUnit
owner=Bane
unit=Barghest
count=4
veteran=No
homecity=None
Randomize
locations
56,22,1 
59,35,1
67,39,1
68,48,1 
64,58,1
endlocations
@ENDIF


; *************************************
; *****   Slaying the Leviathan   *****
; *****       Merfolk Gift        *****
; ************************************* 
;

@IF
UnitKilled
unit=Leviathan
attacker=Anybody
Defender Only
defender=Bane
@THEN
Flag
Who=Vampyres
Continuous
state=on
flag=20
TEXT
^The Leviathan has been destroyed!
^
^A day of Rejoicing is held in coastal cities. 
ENDTEXT
@ENDIF


@IF
UnitKilled
unit=Leviathan
attacker=Anybody
defender=Bane
@AND
CheckFlag
WHO=Vampyres
state=off
flag=20
@THEN
TEXT
no broadcast
^You have successfully fought off the Great 
Leviathan. A heroic deed!
^
^It has returned to the depths of the sea to 
lick its wounds. It will return before long, no doubt.
ENDTEXT
@ENDIF

@IF
UnitKilled
unit=Leviathan
attacker=Anybody
defender=Bane
@AND
CheckFlag
WHO=Vampyres
state=off
flag=20
@THEN
Delay
delay=6
CreateUnit
owner=Bane
unit=Leviathan
veteran=No
homecity=None
Randomize
locations
85,13,0
98,32,0
86,54,0
104,62,0
45,51,0
endlocations
@ENDIF


@IF
UnitKilled
unit=Leviathan
attacker=Anybody
Defender Only
defender=Bane
@AND
CheckFlag
WHO=Vampyres
state=on
flag=20
@THEN
JustOnce
Delay
delay=2
TEXT
no broadcast
^You receive message from the Merfolk king - written 
on shark skin. It requests a meeting with the "King 
of Men that breath the air who have destroyed the Leviathan."
^
^You arrange to meet with the Merfolk emissary at the full tide, next month. 
ENDTEXT
@ENDIF

@IF
UnitKilled
unit=Leviathan
attacker=Anybody
Defender Only
defender=Bane
@AND
CheckFlag
WHO=Vampyres
state=on
flag=20
@THEN
JustOnce
Delay
delay=3
TEXT
no broadcast
You meet with the emissary of the Merfolk King
ENDTEXT
@ENDIF

@IF
UnitKilled
unit=Leviathan
attacker=Anybody
Defender Only
defender=Bane
@AND
CheckFlag
WHO=Vampyres
state=on
flag=20
@THEN
JustOnce
Delay
delay=3
TEXT
no broadcast
"His eminence King Chushoosha, Defender of the Seas, 
Prince of Coral, and Overlord of the Merfolk wishes 
to express his gratitude to the King of those who 
breath the air and call themselves men, for destroying 
the Bibdoolloploop - the monster men call the Leviathan. 
For eight thousand tides the Bibdoolloploop has feed 
upon the Merfolk. But now, thanks to the men who breath 
air, a time of floating in peace can begin."
ENDTEXT
@ENDIF

@IF
UnitKilled
unit=Leviathan
attacker=Anybody
Defender Only
defender=Bane
@AND
CheckFlag
WHO=Vampyres
state=on
flag=20
@THEN
JustOnce
Delay
delay=3
TEXT
no broadcast
"In thanks for destroying the Bibdoolloploop - 
the Prince of Coral wishes you to have this bauble 
that gives knowledge of Lore to its wearer. 
This bauble once belonged to the men who breath air 
and visited the cities of the Merfolk who called 
themselves Lloroi. Now it belongs to you."
ENDTEXT
BestowImprovement
improvement=66        ; Jewel of Knowledge
race=TriggerAttacker
capital=Yes
wonders=No
@ENDIF

@IF
UnitKilled
unit=Open
attacker=Anybody
defender=Bane
@AND
CheckFlag
WHO=Vampyres
state=off
flag=21
@THEN
JustOnce
BestowImprovement
improvement=60        ; Mask of Influence
race=TriggerAttacker
capital=Yes
wonders=No
Flag
Continuous
WHO=Vampyres
state=on
flag=21
TEXT
no broadcast
Your have discovered the fabled Mask of Influence.  
ENDTEXT
@ENDIF

;
; *************************************
; *****      A Wyrm is Born       *****
; ************************************* 
;
@IF
ReceivedTechnology
receiver=Anybody
technology=43         ; Arcane Lore
@AND
RandomTurn
denominator=30
@THEN
CreateUnit
owner=Bane
unit=Wyrm
veteran=No
homecity=None
Randomize
locations
52,66,0 ; Near Elb
59,33,0 ; Near Alatar
98,18,0 ; Near Glockus
85,39,0 ; Lonely Isle
66,6,0 ; Near Gothmog
28,10,0 ; Near Daumen 
37,63,0 ; Near Harlant
endlocations
@ENDIF









;
; ************************************* ASTRAL EVENTS *************************************
;
; *************************************
; *****   ASTRAL SPELL COMPLETE   *****
; *************************************
@IF
CityProduction
builder=Anybody
improvement=65    ; Astral Spell
@THEN
JustOnce
Text
^^The Astral Spell has been completed! 
^
^The physic barrier between Minaria and 
the Astral Plane has been shattered. The 
Kingdoms of Minaria my now build Astral 
Jammers and launch an assault of the 
Necromancer's Stronghold in the Abyss.
EndText
EndGameOverride
@ENDIF

@IF
CityProduction
builder=Anybody
improvement=65    ; Astral Spell
@THEN
Transport
unit=Seraphine
state=On
mode=Native
type=0
@ENDIF

@IF
CityProduction
builder=Anybody
improvement=65    ; Astral Spell
@THEN
Transport
unit=Ariel Trueseer
state=On
mode=Native
type=0
@ENDIF

@IF
CityProduction
builder=Anybody
improvement=65    ; Astral Spell
@THEN
Transport
unit=Lerphin Runeaxe
state=On
mode=Native
type=0
@ENDIF

@IF
CityProduction
builder=Anybody
improvement=65    ; Astral Spell
@THEN
Transport
unit=Magnus Craeft
state=On
mode=Native
type=0
@ENDIF


;
; ************************************* ABYSSAL ASSAULT EVENTS *************************************
;
; *************************************
; *****      Abyssal Assault      *****
; *****          Size=1           *****
; *************************************
@IF
AlphaCentauriArrival
race=anybody
size=1
@THEN
CreateUnit
owner=TriggerAttacker
unit=Guardian
count=6
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

@IF
AlphaCentauriArrival
race=anybody
size=1
@THEN
CreateUnit
owner=TriggerAttacker
unit=Knight
count=4
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

@IF
AlphaCentauriArrival
race=anybody
size=1
@THEN
CreateUnit
owner=TriggerAttacker
unit=Elementalist
count=4
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

@IF
AlphaCentauriArrival
race=anybody
size=1
@THEN
CreateUnit
owner=TriggerAttacker
unit=Thaumaturgist
count=1
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

; *************************************
; *****      Abyssal Assault      *****
; *****          size=2           *****
; *************************************
@IF
AlphaCentauriArrival
race=anybody
size=2
@THEN
CreateUnit
owner=TriggerAttacker
unit=Guardian
count=8
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

@IF
AlphaCentauriArrival
race=anybody
size=2
@THEN
CreateUnit
owner=TriggerAttacker
unit=Knight
count=6
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

@IF
AlphaCentauriArrival
race=anybody
size=2
@THEN
CreateUnit
owner=TriggerAttacker
unit=Elementalist
count=5
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

@IF
AlphaCentauriArrival
race=anybody
size=2
@THEN
CreateUnit
owner=TriggerAttacker
unit=Thaumaturgist
count=2
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

; *************************************
; *****      Abyssal Assault      *****
; *****          size=3           *****
; *************************************
@IF
AlphaCentauriArrival
race=anybody
size=3
@THEN
CreateUnit
owner=TriggerAttacker
unit=Guardian
count=10
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

@IF
AlphaCentauriArrival
race=anybody
size=3
@THEN
CreateUnit
owner=TriggerAttacker
unit=Knight
count=8
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

@IF
AlphaCentauriArrival
race=anybody
size=3
@THEN
CreateUnit
owner=TriggerAttacker
unit=Elementalist
count=6
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

@IF
AlphaCentauriArrival
race=anybody
size=3
@THEN
CreateUnit
owner=TriggerAttacker
unit=Thaumaturgist
count=3
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

; *************************************
; *****      Abyssal Assault      *****
; *****          size=4           *****
; *************************************
@IF
AlphaCentauriArrival
race=anybody
size=4
@THEN
CreateUnit
owner=TriggerAttacker
unit=Guardian
count=12
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

@IF
AlphaCentauriArrival
race=anybody
size=4
@THEN
CreateUnit
owner=TriggerAttacker
unit=Knight
count=9
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

@IF
AlphaCentauriArrival
race=anybody
size=4
@THEN
CreateUnit
owner=TriggerAttacker
unit=Elementalist
count=7
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

@IF
AlphaCentauriArrival
race=anybody
size=4
@THEN
CreateUnit
owner=TriggerAttacker
unit=Thaumaturgist
count=4
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

; *************************************
; *****      Abyssal Assault      *****
; *****          size=5           *****
; *************************************
@IF
AlphaCentauriArrival
race=anybody
size=5
@THEN
CreateUnit
owner=TriggerAttacker
unit=Guardian
count=14
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

@IF
AlphaCentauriArrival
race=anybody
size=5
@THEN
CreateUnit
owner=TriggerAttacker
unit=Knight
count=11
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

@IF
AlphaCentauriArrival
race=anybody
size=5
@THEN
CreateUnit
owner=TriggerAttacker
unit=Elementalist
count=7
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

@IF
AlphaCentauriArrival
race=anybody
size=5
@THEN
CreateUnit
owner=TriggerAttacker
unit=Thaumaturgist
count=5
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF


; *************************************
; *****      Abyssal Assault      *****
; *****          size=6           *****
; *************************************
@IF
AlphaCentauriArrival
race=anybody
size=6
@THEN
CreateUnit
owner=TriggerAttacker
unit=Guardian
count=16
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

@IF
AlphaCentauriArrival
race=anybody
size=6
@THEN
CreateUnit
owner=TriggerAttacker
unit=Knight
count=12
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

@IF
AlphaCentauriArrival
race=anybody
size=6
@THEN
CreateUnit
owner=TriggerAttacker
unit=Elementalist
count=8
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

@IF
AlphaCentauriArrival
race=anybody
size=6
@THEN
CreateUnit
owner=TriggerAttacker
unit=Thaumaturgist
count=6
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF


; *************************************
; *****      Abyssal Assault      *****
; *****          size=7           *****
; *************************************
@IF
AlphaCentauriArrival
race=anybody
size=7
@THEN
CreateUnit
owner=TriggerAttacker
unit=Guardian
count=18
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

@IF
AlphaCentauriArrival
race=anybody
size=7
@THEN
CreateUnit
owner=TriggerAttacker
unit=Knight
count=14
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

@IF
AlphaCentauriArrival
race=anybody
size=7
@THEN
CreateUnit
owner=TriggerAttacker
unit=Elementalist
count=9
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

@IF
AlphaCentauriArrival
race=anybody
size=7
@THEN
CreateUnit
owner=TriggerAttacker
unit=Thaumaturgist
count=7
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF


; *************************************
; *****      Abyssal Assault      *****
; *****          size=8           *****
; *************************************
@IF
AlphaCentauriArrival
race=anybody
size=8
@THEN
CreateUnit
owner=TriggerAttacker
unit=Guardian
count=20
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

@IF
AlphaCentauriArrival
race=anybody
size=8
@THEN
CreateUnit
owner=TriggerAttacker
unit=Knight
count=16
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

@IF
AlphaCentauriArrival
race=anybody
size=8
@THEN
CreateUnit
owner=TriggerAttacker
unit=Elementalist
count=10
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF

@IF
AlphaCentauriArrival
race=anybody
size=8
@THEN
CreateUnit
owner=TriggerAttacker
unit=Thaumaturgist
count=8
veteran=No
homecity=None
Randomize
locations
55,67,1
56,62,1
56,70,1
60,72,1
62,70,1
66,70,1
65,73,1
68,62,1
68,74,1
71,71,1
endlocations
@ENDIF


@IF
CityTaken	
city=Zards
attacker=Anybody
defender=Vampyres
@THEN
JustOnce
TEXT
no broadcast
You have captured the City of Zards and won a Decisive Victory. Congratulations!
ENDTEXT
EnableTechnology
whom=Vampyres
technology=33      ; Reconstitution
value=2
@ENDIF

@IF
CityTaken	
city=Zards
attacker=Anybody
defender=Vampyres
@THEN
TEXT
JustOnce
^^The Vampyre Stronghold of Zards has fallen!
^
^^Game Over.
ENDTEXT
GiveTechnology
technology=68     ; Wraithform
receiver=Vampyres
EndGame
endscreens=yes
@ENDIF


@ENDEVENTS




